<?php

namespace App\Http\Controllers\Admin;

use App\Models\Base;
use App\Models\Fang;
use App\Models\Node;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class IndexController extends Controller
{
    // index
    public function index()
    {
        $data = (new Node())->getTreeList();
        // 后台首页
        return view('admin.index.index', compact('data'));
    }

    // welcome
    public function welcome()
    {
        // 获取房源出租情况  得到数组
        $data = (new Fang())->fangcount();
        return view('admin/index/welcome', $data);
    }

    // chart-1
    public function chart_1()
    {
        return view('admin.index.charts_1');
    }

    // chart-1
    public function chart_2()
    {
        return view('admin.index.charts_2');
    }

    // chart-1
    public function chart_3()
    {
        return view('admin.index.charts_3');
    }

    // chart-1
    public function chart_4()
    {
        return view('admin.index.charts_4');
    }

    // chart-1
    public function chart_5()
    {
        return view('admin.index.charts_5');
    }

    // chart-1
    public function chart_6()
    {
        return view('admin.index.charts_6');
    }

    // chart-1
    public function chart_7()
    {
        return view('admin.index.charts_7');
    }
}
